/**
 * TDS PEC 4
 * Grupo 3H2M 
 *
 * El paquete <code>edu.uoc.tds.pec4.conexion</code> agrupa todas las
 * interfaces, clases y elementos de la GUI para el control del subsistema de Conexion
 */

package edu.uoc.tds.pec4.conexion;

import edu.uoc.tds.pec4.rmi.GestorConexionInterface;
import edu.uoc.tds.pec4.beans.SolicitudDTO;
import edu.uoc.tds.pec4.rmi.GestorDiccionarioInterface;
import edu.uoc.tds.pec4.common.util.Constantes;
import edu.uoc.tds.pec4.common.util.TDSLanguageUtils;
import edu.uoc.tds.pec4.common.util.UtilidadesGUI;
import edu.uoc.tds.pec4.server.bbdd.exceptions.GestorConexionException;
import java.rmi.RemoteException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 * La clase <code>DialogCancelacionReserva</code> representa la interfaz de
 * usuario para consultar y cancelar una reserva que ha realizado.<br />
 *
 * Interficie de cancelacion de reservas.
 *
 * @author	Jaime Marcos de la Calle
 * @version	28/11/2011
 */
public class DialogCancelacionReserva extends javax.swing.JDialog {

    /** idSolicitud es el identificador de la solicitud en pantalla */
    private int idReserva;

    /** objRemoto Es el objeto empleado como interfaz en la comunicación RMI */
    private GestorDiccionarioInterface objRemotoDic = null;
    private GestorConexionInterface objRemoto = null;
    
    private javax.swing.JPanel DatosGenerales;
    private javax.swing.JPanel DatosSolicitud;
    private javax.swing.JButton JButtonCancelar;
    private javax.swing.JCheckBox chkDiaCompleto;
    private javax.swing.JButton jButtonEnviarCancelacion;
    private javax.swing.JLabel jLabelAforo;
    private javax.swing.JLabel jLabelDesdeFecha;
    private javax.swing.JLabel jLabelDesdeFecha1;
    private javax.swing.JLabel jLabelEstado;
    private javax.swing.JLabel jLabelFechaSolicitud;
    private javax.swing.JLabel jLabelFechaSolicitud1;
    private javax.swing.JLabel jLabelHastaFecha;
    private javax.swing.JLabel jLabelHastaFecha1;
    private javax.swing.JLabel jLabelIdSolicitud;
    private javax.swing.JLabel jLabelIdSolicitud1;
    private javax.swing.JLabel jLabelLocalidad;
    private javax.swing.JLabel jLabelPais;
    private javax.swing.JLabel jLabelProvincia;
    private javax.swing.JLabel jLabelSuperficie;
    private javax.swing.JLabel jLabelTipoEncuentro;
    private javax.swing.JList jListCFisicas;
    private javax.swing.JPanel jPanelCaracyEquipa;
    private javax.swing.JPanel jPanelCaracyEquipa1;
    private javax.swing.JPanel jPanelDatosInteres;
    private javax.swing.JPanel jPanelDuracion;
    private javax.swing.JPanel jPanelEquipamientoSeleccionado;
    private javax.swing.JPanel jPanelFechaHoraEncuentro;
    private javax.swing.JPanel jPanelLocalizacion;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTable jTableEquipamiento;
    private javax.swing.JTextArea jTextAreaObservaciones;
    private javax.swing.JLabel labelCliente;
    private javax.swing.JTextField txtAsistentes;
    private javax.swing.JTextField txtCiudad;
    private javax.swing.JTextField txtCliente;
    private javax.swing.JTextField txtEstado;
    private javax.swing.JTextField txtFechaFin;
    private javax.swing.JTextField txtFechaIni;
    private javax.swing.JTextField txtFechaSolicitud;
    private javax.swing.JTextField txtHoraFin;
    private javax.swing.JTextField txtHoraIni;
    private javax.swing.JTextField txtHoraSolicitud;
    private javax.swing.JTextField txtIdSolicitud;
    private javax.swing.JTextField txtPais;
    private javax.swing.JTextField txtProvincia;
    private javax.swing.JTextField txtSuperficie;
    private javax.swing.JTextField txtTipoEncuentro;
    private javax.swing.JTextField txtTipoSolicitud;

    /** Creates new form DialogDetalleSolicitud */
    public DialogCancelacionReserva(java.awt.Frame parent, boolean modal,
                GestorDiccionarioInterface objRemotoDic, GestorConexionInterface objRemoto,
                int idSolicitud) {
        super(parent, TDSLanguageUtils.getMessage("cliente.cancelacion.reserva.titulo"), modal);

        this.idReserva = idSolicitud;
        this.objRemotoDic = objRemotoDic;
        this.objRemoto = objRemoto;

        initComponents();

        mostrarDatos();
    }

    /**
     * Muestra los datos de la solicitud en pantalla
     */
    private void mostrarDatos() {
        try {
            // Llamamos al objeto remoto
            SolicitudDTO sol;
            sol = objRemoto.getSolicitud(idReserva);

            // Cargamos los controles
            txtIdSolicitud.setText(sol.getIdSolicitud().toString());
            txtCliente.setText(sol.getNomCliente());
            txtTipoSolicitud.setText(TDSLanguageUtils.getMessage("aulas.consulta.solicitudes.tipo." + sol.getTipo()));
            txtFechaSolicitud.setText(UtilidadesGUI.obtenerFecha(sol.getFechaSol()));
            txtHoraSolicitud.setText(UtilidadesGUI.obtenerHora(sol.getHoraSol()));
            txtEstado.setText(TDSLanguageUtils.getMessage("aulas.consulta.solicitudes.estado." + sol.getEstado()));
            txtTipoEncuentro.setText(sol.getNomTEncuentro());
            txtSuperficie.setText(sol.getSuperficie().toString());
            txtAsistentes.setText(sol.getAsistentes().toString());

            txtFechaIni.setText(UtilidadesGUI.obtenerFecha(sol.getFechaIni()));
            txtFechaFin.setText(UtilidadesGUI.obtenerFecha(sol.getFechaFin()));
            if (!sol.getDiaCompleto()){
                txtHoraIni.setText(UtilidadesGUI.obtenerHora(sol.getHoraIni()));
                txtHoraFin.setText(UtilidadesGUI.obtenerHora(sol.getHoraFin()));
                chkDiaCompleto.setSelected(false);                
            }else
                chkDiaCompleto.setSelected(true);

            txtCiudad.setText(sol.getNomCiudad());
            txtProvincia.setText(sol.getNomProvincia());
            txtPais.setText(sol.getNomPais());

            jListCFisicas.setListData(sol.getListCFisicas().toArray());
            jListCFisicas.repaint();

            for (int i=0;i<sol.getListEquipamiento().size();i++) {
                jTableEquipamiento.setValueAt(sol.getListEquipamiento().get(i).getNomEquipamiento(),i,0);
                jTableEquipamiento.setValueAt(sol.getListEquipamiento().get(i).getCantidad(),i,1);
            }
            jTableEquipamiento.repaint();

            jTextAreaObservaciones.setText(sol.getObservaciones());

            if (sol.getTipo() == 1)
                jButtonEnviarCancelacion.setEnabled(true);
            else
                jButtonEnviarCancelacion.setEnabled(false);
            } catch (GestorConexionException giE) {
            JOptionPane.showMessageDialog(null,
                    TDSLanguageUtils.getMessage("aulas.consulta.solicitudes.err.gestor.desc") + Constantes.SL +
                    giE.getMessage(), TDSLanguageUtils.getMessage("conexion.consulta.solicitudes.err.gestor"),
                    JOptionPane.ERROR_MESSAGE);
            } catch (RemoteException eRe) {
                JOptionPane.showMessageDialog(null,
                        TDSLanguageUtils.getMessage("aulas.consulta.solicitudes.err.gestor.desc") + Constantes.SL +
                        eRe.getMessage(), TDSLanguageUtils.getMessage("conexion.consulta.solicitudes.err.remoto.desc"),
                        JOptionPane.ERROR_MESSAGE);
        }

    }
    
    private boolean cancelarReserva (){
        boolean realizado = false;
            try {
                realizado = objRemoto.cancelarReserva(idReserva);
            } catch (RemoteException ex) {
                Logger.getLogger(DialogCancelacionReserva.class.getName()).log(Level.SEVERE, null, ex);
            } catch (GestorConexionException ex) {
                Logger.getLogger(DialogCancelacionReserva.class.getName()).log(Level.SEVERE, null, ex);
            }
         return realizado;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {

        DatosSolicitud = new javax.swing.JPanel();
        jLabelIdSolicitud = new javax.swing.JLabel();
        txtIdSolicitud = new javax.swing.JTextField();
        jLabelIdSolicitud1 = new javax.swing.JLabel();
        txtTipoSolicitud = new javax.swing.JTextField();
        jLabelEstado = new javax.swing.JLabel();
        txtEstado = new javax.swing.JTextField();
        txtHoraSolicitud = new javax.swing.JTextField();
        jLabelFechaSolicitud = new javax.swing.JLabel();
        jLabelFechaSolicitud1 = new javax.swing.JLabel();
        txtFechaSolicitud = new javax.swing.JTextField();
        txtCliente = new javax.swing.JTextField();
        labelCliente = new javax.swing.JLabel();
        DatosGenerales = new javax.swing.JPanel();
        jLabelSuperficie = new javax.swing.JLabel();
        txtSuperficie = new javax.swing.JTextField();
        jLabelAforo = new javax.swing.JLabel();
        txtAsistentes = new javax.swing.JTextField();
        jLabelTipoEncuentro = new javax.swing.JLabel();
        txtTipoEncuentro = new javax.swing.JTextField();
        jPanelFechaHoraEncuentro = new javax.swing.JPanel();
        jLabelDesdeFecha = new javax.swing.JLabel();
        txtFechaIni = new javax.swing.JTextField();
        txtFechaFin = new javax.swing.JTextField();
        jLabelHastaFecha = new javax.swing.JLabel();
        jPanelDuracion = new javax.swing.JPanel();
        jLabelDesdeFecha1 = new javax.swing.JLabel();
        txtHoraIni = new javax.swing.JTextField();
        txtHoraFin = new javax.swing.JTextField();
        jLabelHastaFecha1 = new javax.swing.JLabel();
        chkDiaCompleto = new javax.swing.JCheckBox();
        jPanelLocalizacion = new javax.swing.JPanel();
        jLabelLocalidad = new javax.swing.JLabel();
        jLabelProvincia = new javax.swing.JLabel();
        jLabelPais = new javax.swing.JLabel();
        txtProvincia = new javax.swing.JTextField();
        txtCiudad = new javax.swing.JTextField();
        txtPais = new javax.swing.JTextField();
        jPanelCaracyEquipa = new javax.swing.JPanel();
        jPanelCaracyEquipa1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jListCFisicas = new javax.swing.JList();
        jPanelEquipamientoSeleccionado = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTableEquipamiento = new javax.swing.JTable();
        jPanelDatosInteres = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextAreaObservaciones = new javax.swing.JTextArea();
        jButtonEnviarCancelacion = new javax.swing.JButton();
        JButtonCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        DatosSolicitud.setBorder(javax.swing.BorderFactory.createTitledBorder(null, TDSLanguageUtils.getMessage("aulas.detalle.solicitudes.datossolicitud"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        DatosSolicitud.setName(TDSLanguageUtils.getMessage("cliente.cancelacion.reserva.titulo")); 

        jLabelIdSolicitud.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.idSolicitud"));

        txtIdSolicitud.setEditable(false);

        jLabelIdSolicitud1.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.tipo.solicitud"));

        txtTipoSolicitud.setEditable(false);

        jLabelEstado.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.estado"));

        txtEstado.setEditable(false);

        txtHoraSolicitud.setEditable(false);

        jLabelFechaSolicitud.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.fecha"));

        jLabelFechaSolicitud1.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.hora"));

        txtFechaSolicitud.setEditable(false);

        txtCliente.setEditable(false);

        labelCliente.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.cliente"));

        javax.swing.GroupLayout DatosSolicitudLayout = new javax.swing.GroupLayout(DatosSolicitud);
        DatosSolicitud.setLayout(DatosSolicitudLayout);
        DatosSolicitudLayout.setHorizontalGroup(
            DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DatosSolicitudLayout.createSequentialGroup()
                .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(DatosSolicitudLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelIdSolicitud1)
                            .addComponent(jLabelIdSolicitud)
                            .addComponent(labelCliente))
                        .addGap(4, 4, 4)
                        .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(DatosSolicitudLayout.createSequentialGroup()
                                .addComponent(txtTipoSolicitud, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(90, 90, 90)
                                .addComponent(jLabelEstado))
                            .addGroup(DatosSolicitudLayout.createSequentialGroup()
                                .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(txtIdSolicitud, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtCliente, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE))
                                .addGap(90, 90, 90)
                                .addComponent(jLabelFechaSolicitud1))))
                    .addGroup(DatosSolicitudLayout.createSequentialGroup()
                        .addGap(304, 304, 304)
                        .addComponent(jLabelFechaSolicitud)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtFechaSolicitud, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                    .addComponent(txtEstado, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                    .addComponent(txtHoraSolicitud, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
                .addContainerGap())
        );
        DatosSolicitudLayout.setVerticalGroup(
            DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DatosSolicitudLayout.createSequentialGroup()
                .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(DatosSolicitudLayout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelIdSolicitud)
                            .addComponent(txtIdSolicitud, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(DatosSolicitudLayout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addComponent(jLabelFechaSolicitud))
                    .addGroup(DatosSolicitudLayout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(txtFechaSolicitud, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabelFechaSolicitud1)
                        .addComponent(txtHoraSolicitud, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(labelCliente)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(DatosSolicitudLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabelIdSolicitud1))
                    .addComponent(txtTipoSolicitud, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(DatosSolicitudLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addGroup(DatosSolicitudLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelEstado)
                            .addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
        );

        DatosGenerales.setBorder(javax.swing.BorderFactory.createTitledBorder(null, TDSLanguageUtils.getMessage("cliente.cancelacion.datos.generales"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        DatosGenerales.setName(TDSLanguageUtils.getMessage("cliente.cancelacion.datos.generales")); 

        jLabelSuperficie.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.datos.superficie"));

        txtSuperficie.setEditable(false);

        jLabelAforo.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.datos.aforo"));
        jLabelAforo.setToolTipText(TDSLanguageUtils.getMessage("cliente.cancelacion.datos.aforo"));

        txtAsistentes.setEditable(false);

        jLabelTipoEncuentro.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.datos.tipo.encuentro"));

        txtTipoEncuentro.setEditable(false);

        jPanelFechaHoraEncuentro.setBorder(javax.swing.BorderFactory.createTitledBorder(null, TDSLanguageUtils.getMessage("cliente.cancelacion.fecha"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        jPanelFechaHoraEncuentro.setName(TDSLanguageUtils.getMessage("cliente.cancelacion.fecha")); 

        jLabelDesdeFecha.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelDesdeFecha.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.fecha.desde"));

        txtFechaIni.setEditable(false);

        txtFechaFin.setEditable(false);

        jLabelHastaFecha.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelHastaFecha.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.fecha.hasta"));

        javax.swing.GroupLayout jPanelFechaHoraEncuentroLayout = new javax.swing.GroupLayout(jPanelFechaHoraEncuentro);
        jPanelFechaHoraEncuentro.setLayout(jPanelFechaHoraEncuentroLayout);
        jPanelFechaHoraEncuentroLayout.setHorizontalGroup(
            jPanelFechaHoraEncuentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFechaHoraEncuentroLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelFechaHoraEncuentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelHastaFecha)
                    .addComponent(jLabelDesdeFecha))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelFechaHoraEncuentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtFechaFin)
                    .addComponent(txtFechaIni, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanelFechaHoraEncuentroLayout.setVerticalGroup(
            jPanelFechaHoraEncuentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFechaHoraEncuentroLayout.createSequentialGroup()
                .addGroup(jPanelFechaHoraEncuentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelDesdeFecha)
                    .addComponent(txtFechaIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFechaHoraEncuentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelHastaFecha)
                    .addComponent(txtFechaFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(25, Short.MAX_VALUE))
        );

        jPanelDuracion.setBorder(javax.swing.BorderFactory.createTitledBorder(null, TDSLanguageUtils.getMessage("cliente.cancelacion.duracion"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        jPanelDuracion.setName(TDSLanguageUtils.getMessage("cliente.cancelacion.duracion")); 

        jLabelDesdeFecha1.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelDesdeFecha1.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.duracion.de"));

        txtHoraIni.setEditable(false);

        txtHoraFin.setEditable(false);

        jLabelHastaFecha1.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelHastaFecha1.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.duracion.a"));

        chkDiaCompleto.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.duracion.completo"));
        chkDiaCompleto.setEnabled(false);

        javax.swing.GroupLayout jPanelDuracionLayout = new javax.swing.GroupLayout(jPanelDuracion);
        jPanelDuracion.setLayout(jPanelDuracionLayout);
        jPanelDuracionLayout.setHorizontalGroup(
            jPanelDuracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDuracionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDuracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelDuracionLayout.createSequentialGroup()
                        .addGroup(jPanelDuracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelHastaFecha1)
                            .addComponent(jLabelDesdeFecha1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanelDuracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtHoraFin)
                            .addComponent(txtHoraIni, javax.swing.GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE)))
                    .addComponent(chkDiaCompleto))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanelDuracionLayout.setVerticalGroup(
            jPanelDuracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDuracionLayout.createSequentialGroup()
                .addGroup(jPanelDuracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelDesdeFecha1)
                    .addComponent(txtHoraIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDuracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelHastaFecha1)
                    .addComponent(txtHoraFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkDiaCompleto)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout DatosGeneralesLayout = new javax.swing.GroupLayout(DatosGenerales);
        DatosGenerales.setLayout(DatosGeneralesLayout);
        DatosGeneralesLayout.setHorizontalGroup(
            DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DatosGeneralesLayout.createSequentialGroup()
                .addGroup(DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelTipoEncuentro)
                    .addComponent(jLabelSuperficie)
                    .addComponent(jLabelAforo))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtTipoEncuentro, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtSuperficie, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAsistentes, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jPanelFechaHoraEncuentro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanelDuracion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(29, Short.MAX_VALUE))
        );
        DatosGeneralesLayout.setVerticalGroup(
            DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DatosGeneralesLayout.createSequentialGroup()
                .addGroup(DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(DatosGeneralesLayout.createSequentialGroup()
                        .addGap(14, 14, 14)
                        .addGroup(DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelTipoEncuentro)
                            .addComponent(txtTipoEncuentro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelSuperficie)
                            .addComponent(txtSuperficie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(DatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelAforo)
                            .addComponent(txtAsistentes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanelFechaHoraEncuentro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelDuracion, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanelLocalizacion.setBorder(javax.swing.BorderFactory.createTitledBorder(null, TDSLanguageUtils.getMessage("cliente.cancelacion.localizacion"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        jPanelLocalizacion.setName( TDSLanguageUtils.getMessage("cliente.cancelacion.localizacion")); 

        jLabelLocalidad.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelLocalidad.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.localizacion.ciudad"));

        jLabelProvincia.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelProvincia.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.localizacion.provincia"));

        jLabelPais.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabelPais.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.localizacion.pais"));

        txtProvincia.setEditable(false);

        txtCiudad.setEditable(false);

        txtPais.setEditable(false);

        javax.swing.GroupLayout jPanelLocalizacionLayout = new javax.swing.GroupLayout(jPanelLocalizacion);
        jPanelLocalizacion.setLayout(jPanelLocalizacionLayout);
        jPanelLocalizacionLayout.setHorizontalGroup(
            jPanelLocalizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelLocalizacionLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelLocalidad)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabelProvincia)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelPais, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtPais, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanelLocalizacionLayout.setVerticalGroup(
            jPanelLocalizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelLocalizacionLayout.createSequentialGroup()
                .addGroup(jPanelLocalizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelLocalizacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabelLocalidad)
                        .addComponent(txtCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabelProvincia)
                        .addComponent(txtProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabelPais)
                    .addComponent(txtPais, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelCaracyEquipa.setBorder(javax.swing.BorderFactory.createTitledBorder(TDSLanguageUtils.getMessage("cliente.cancelacion.caract.fisicas.equipamiento")));

        jPanelCaracyEquipa1.setBorder(javax.swing.BorderFactory.createTitledBorder(TDSLanguageUtils.getMessage("cliente.cancelacion.caract.fisicas")));

        jListCFisicas.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane1.setViewportView(jListCFisicas);

        javax.swing.GroupLayout jPanelCaracyEquipa1Layout = new javax.swing.GroupLayout(jPanelCaracyEquipa1);
        jPanelCaracyEquipa1.setLayout(jPanelCaracyEquipa1Layout);
        jPanelCaracyEquipa1Layout.setHorizontalGroup(
            jPanelCaracyEquipa1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jPanelCaracyEquipa1Layout.setVerticalGroup(
            jPanelCaracyEquipa1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCaracyEquipa1Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelEquipamientoSeleccionado.setBorder(javax.swing.BorderFactory.createTitledBorder(TDSLanguageUtils.getMessage("cliente.cancelacion.equipamiento.seleccionado")));

        jTableEquipamiento.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                TDSLanguageUtils.getMessage("cliente.cancelacion.equipamiento"), TDSLanguageUtils.getMessage("cliente.cancelacion.cantidad")
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(jTableEquipamiento);

        javax.swing.GroupLayout jPanelEquipamientoSeleccionadoLayout = new javax.swing.GroupLayout(jPanelEquipamientoSeleccionado);
        jPanelEquipamientoSeleccionado.setLayout(jPanelEquipamientoSeleccionadoLayout);
        jPanelEquipamientoSeleccionadoLayout.setHorizontalGroup(
            jPanelEquipamientoSeleccionadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelEquipamientoSeleccionadoLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(36, 36, 36))
        );
        jPanelEquipamientoSeleccionadoLayout.setVerticalGroup(
            jPanelEquipamientoSeleccionadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelEquipamientoSeleccionadoLayout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanelCaracyEquipaLayout = new javax.swing.GroupLayout(jPanelCaracyEquipa);
        jPanelCaracyEquipa.setLayout(jPanelCaracyEquipaLayout);
        jPanelCaracyEquipaLayout.setHorizontalGroup(
            jPanelCaracyEquipaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCaracyEquipaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelCaracyEquipa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanelEquipamientoSeleccionado, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10))
        );
        jPanelCaracyEquipaLayout.setVerticalGroup(
            jPanelCaracyEquipaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCaracyEquipaLayout.createSequentialGroup()
                .addGroup(jPanelCaracyEquipaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanelEquipamientoSeleccionado, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelCaracyEquipa1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelDatosInteres.setBorder(javax.swing.BorderFactory.createTitledBorder(null,TDSLanguageUtils.getMessage("cliente.cancelacion.observaciones"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); 
        jPanelDatosInteres.setName(TDSLanguageUtils.getMessage("cliente.cancelacion.observaciones")); 

        jTextAreaObservaciones.setColumns(20);
        jTextAreaObservaciones.setEditable(false);
        jTextAreaObservaciones.setRows(5);
        jScrollPane3.setViewportView(jTextAreaObservaciones);

        javax.swing.GroupLayout jPanelDatosInteresLayout = new javax.swing.GroupLayout(jPanelDatosInteres);
        jPanelDatosInteres.setLayout(jPanelDatosInteresLayout);
        jPanelDatosInteresLayout.setHorizontalGroup(
            jPanelDatosInteresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosInteresLayout.createSequentialGroup()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelDatosInteresLayout.setVerticalGroup(
            jPanelDatosInteresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosInteresLayout.createSequentialGroup()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jButtonEnviarCancelacion.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.enviar.cancelacion"));
        jButtonEnviarCancelacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEnviarCancelacionActionPerformed(evt);
            }
        });

        JButtonCancelar.setText(TDSLanguageUtils.getMessage("cliente.cancelacion.cancelar"));
        JButtonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JButtonCancelarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanelDatosInteres, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jPanelCaracyEquipa, javax.swing.GroupLayout.Alignment.LEADING, 0, 567, Short.MAX_VALUE)
                            .addComponent(jPanelLocalizacion, javax.swing.GroupLayout.Alignment.LEADING, 0, 567, Short.MAX_VALUE)
                            .addComponent(DatosSolicitud, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(DatosGenerales, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGap(199, 199, 199)
                        .addComponent(jButtonEnviarCancelacion, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(34, 34, 34)
                        .addComponent(JButtonCancelar)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(DatosSolicitud, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(DatosGenerales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelLocalizacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanelCaracyEquipa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelDatosInteres, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonEnviarCancelacion)
                    .addComponent(JButtonCancelar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }
    
    /* Cierra la pantalla actual sin guardar cambios
     * 
     */
    private void JButtonCancelarActionPerformed(java.awt.event.ActionEvent evt) {
        dispose();
    }

    /* Añade la solicitud de cancelacion y cierra la pantalla actual
     * 
     */
    private void jButtonEnviarCancelacionActionPerformed(java.awt.event.ActionEvent evt) {
        cancelarReserva();
        dispose();
    }
}
